// 是否为移动端
export const isMobile = () => {
  let sUserAgent = navigator.userAgent.toLowerCase()
  let bIsIpad = sUserAgent.match(/ipad/i) && sUserAgent.match(/ipad/i)[0] === 'ipad'
  let bIsIphoneOs = sUserAgent.match(/iphone os/i) && sUserAgent.match(/iphone os/i)[0] === 'iphone os'
  let bIsMidp = sUserAgent.match(/midp/i) && sUserAgent.match(/midp/i)[0] === 'midp'
  let bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) && sUserAgent.match(/rv:1.2.3.4/i)[0] === 'rv:1.2.3.4'
  let bIsUc = sUserAgent.match(/ucweb/i) && sUserAgent.match(/ucweb/i)[0] === 'ucweb'
  let bIsAndroid = sUserAgent.match(/android/i) && sUserAgent.match(/android/i)[0] === 'android'
  let bIsCE = sUserAgent.match(/windows ce/i) && sUserAgent.match(/windows ce/i)[0] === 'windows ce'
  let bIsWM = sUserAgent.match(/windows mobile/i) && sUserAgent.match(/windows mobile/i)[0] === 'windows mobile'
  let bIsWebview = sUserAgent.match(/webview/i) && sUserAgent.match(/webview/i)[0] === 'webview'
  return (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM || bIsWebview)
}